package com.study.model.jdao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.study.model.pojo.Dept;

public interface DeptJdao extends CrudRepository<Dept,Integer>{
	
	public List<Dept> findAll();
	/**
	 * 查询除了现在所在部门的其余部门*/
	@Query("from Dept d,Emp e where d.deptno=e.deptno and e.eid=?1")
	public List<Dept> findnotnow(int eid);
	
}
